$(function () {
    $("#gradeTable").bootstrapTable({
        method: "get",
        contentType: "application/json",
        url: "/inputmanagerController/getAllSCell",
        // striped: true,
        pageNumber: 1,
        pagination: true,
        sidePagination: 'server',
        pageSize: 5,
        pageList: [1, 3, 5, 7],
        queryParams: function (parmes) {
            return {
                pageNum: (parmes.offset / parmes.limit) + 1,
                pageSize: parmes.limit,
                productId: $("#productId").val(),
                productName: $("#productName").val(),
                // registerTime: $("#registerTime").val(),
                // checker: $("#checker").val(),
                //checkTag: $('input[name="checkTag"]:checked').val(),
            }
        },
        columns: [
            {title: "I级产品分类", field: '', align: "center",
                formatter: function (value,row,index) {
                   return "01/电子"
                }
            },
            {title: "II级产品分类", field: '', align: "center",
                formatter: function (value,row,index) {
                    return "01/计算机"
                }},
            {title: "III级产品分类", field: '', align: "center",
                formatter: function (value,row,index) {
                    return "01/服务器"
                }},
            {title: "产品编号/名称", field: 'productId', align: "center",
                formatter: function (value,row,index) {
                    return value +"/"+ row.productName
                }},
           // {title: "产品名称", field: 'productName', align: "center"},
            {title: "库存数量", field: 'amount', align: "center"},
            {title: "剩余储存量", field: 'maxCapacityAmount', align: "center",
                formatter: function (value,row,index) {
                    return value-row.amount
                }},
            {title: "最大存储量", field: 'maxCapacityAmount', align: "center"},
        ]
    })
    $("#condition").click(function () {
        $("#gradeTable").bootstrapTable("refresh")
    })
})